package cn.itrip.trade.config;
import javax.net.ssl.SSLContext;

public class WXPayConfig {
    /**
     * http请求连接超时时间
     */
    private int httpConnectionTimeout = 5000;

    /**
     * http请求数据读取等待时间
     */
    private int httpTimeout = 10000;

    //應用id
    private String appId;
    //
    private String subAppId;
    //商戶號
    private String mchId;

    private String key;
    private String mchKey;
    private String subMchId;
    //異步訪問地址
    private String notifyUrl;
    //交易類型
    private String tradeType;
    private String signType;
    private SSLContext sslContext;
    //簽名
    private String keyPath;
    private boolean useSandboxEnv = false;
    private String httpProxyHost;
    private Integer httpProxyPort;
    private String httpProxyUsername;
    private String httpProxyPassword;

    public String getKeyPath() {
        return keyPath;
    }

    /**
     * 设置证书
     *
     * @param keyPath apiclient_cert.p12的文件的绝对路径
     */
    public void setKeyPath(String keyPath) {
        this.keyPath = keyPath;
    }

    /**
     * 商户号
     */
    public String getMchId() {
        return this.mchId;
    }

    public void setMchId(String mchId) {
        this.mchId = mchId;
    }

    /**
     * 商户密钥
     */
    public String getMchKey() {
        return this.mchKey;
    }

    public void setMchKey(String mchKey) {
        this.mchKey = mchKey;
    }

    /**
     * 公众号appid
     */
    public String getAppId() {
        return this.appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    /**
     * 服务商模式下的子商户公众账号ID
     */
    public String getSubAppId() {
        return this.subAppId;
    }

    public void setSubAppId(String subAppId) {
        this.subAppId = subAppId;
    }

    /**
     * 服务商模式下的子商户号
     */
    public String getSubMchId() {
        return this.subMchId;
    }

    public void setSubMchId(String subMchId) {
        this.subMchId = subMchId;
    }

    /**
     * 微信支付异步回掉地址，通知url必须为直接可访问的url，不能携带参数。
     */
    public String getNotifyUrl() {
        return this.notifyUrl;
    }

    public void setNotifyUrl(String notifyUrl) {
        this.notifyUrl = notifyUrl;
    }

    /**
     * 交易类型
     * <pre>
     * JSAPI--公众号支付
     * NATIVE--原生扫码支付
     * APP--app支付
     * </pre>
     */
    public String getTradeType() {
        return this.tradeType;
    }

    public void setTradeType(String tradeType) {
        this.tradeType = tradeType;
    }

    /**
     * 签名方式
     * 有两种HMAC_SHA256 和MD5
     * @see
     */
    public String getSignType() {
        return this.signType;
    }

    public void setSignType(String signType) {
        this.signType = signType;
    }

    public SSLContext getSslContext() {
        return this.sslContext;
    }

    public void setSslContext(SSLContext sslContext) {
        this.sslContext = sslContext;
    }

    /**
     * 微信支付是否使用仿真测试环境
     * 默认不使用
     */
    public boolean useSandbox() {
        return this.useSandboxEnv;
    }

    /**
     * 设置是否使用沙箱仿真测试环境
     */
    public void setUseSandboxEnv(boolean useSandboxEnv) {
        this.useSandboxEnv = useSandboxEnv;
    }



    /**
     * http请求连接超时时间
     */
    public int getHttpConnectionTimeout() {
        return this.httpConnectionTimeout;
    }

    public void setHttpConnectionTimeout(int httpConnectionTimeout) {
        this.httpConnectionTimeout = httpConnectionTimeout;
    }

    /**
     * http请求数据读取等待时间
     */
    public int getHttpTimeout() {
        return this.httpTimeout;
    }

    public void setHttpTimeout(int httpTimeout) {
        this.httpTimeout = httpTimeout;
    }

    public String getHttpProxyHost() {
        return httpProxyHost;
    }

    public void setHttpProxyHost(String httpProxyHost) {
        this.httpProxyHost = httpProxyHost;
    }

    public Integer getHttpProxyPort() {
        return httpProxyPort;
    }

    public void setHttpProxyPort(Integer httpProxyPort) {
        this.httpProxyPort = httpProxyPort;
    }

    public String getHttpProxyUsername() {
        return httpProxyUsername;
    }

    public void setHttpProxyUsername(String httpProxyUsername) {
        this.httpProxyUsername = httpProxyUsername;
    }

    public String getHttpProxyPassword() {
        return httpProxyPassword;
    }

    public void setHttpProxyPassword(String httpProxyPassword) {
        this.httpProxyPassword = httpProxyPassword;
    }
}
